package com.springboot.demo.service;


import com.cx.item.common.service.BaseService;
import com.github.pagehelper.PageInfo;
import com.springboot.demo.model.example.GoodsExample;
import com.springboot.demo.model.model.Goods;
import com.springboot.demo.model.par.GoodsAddOrUpdatePar;
import com.springboot.demo.model.query.GoodsListQuery;
import com.springboot.demo.model.vo.GoodsDetailsVo;
import com.springboot.demo.model.vo.GoodsListVo;
import com.springboot.demo.model.vo.GoodsTypeListVo;

import java.util.List;

public interface GoodsBGService extends BaseService<Goods, GoodsExample> {

    PageInfo<List<GoodsListVo>> getGoodsList(GoodsListQuery goodsListQuery);

    GoodsDetailsVo getGoodsDetails(Integer goodsId);

    int updateGoods(GoodsAddOrUpdatePar goodsAddOrUpdatePar);

    int addGoods(GoodsAddOrUpdatePar goodsAddOrUpdatePar);

    List<Goods> selectByExampleWithBLOBs(GoodsExample example);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    /**
     * 获取商品类型列表
     *
     * @param goodsType 商品类别1:月嫂类 2:保洁类，为空获取全部商品类别
     * @return
     */
    PageInfo<List<GoodsTypeListVo>> getGoodsTypeList(Integer goodsType);
}